<template>
  <div>
    <el-empty v-show="!tableData.length" description="暂无数据"></el-empty>
    <Flow v-if="tableData.length" :tableData="tableData" />
  </div>
</template>
<script>
import { flowApiQueryCurrentFlowInfo } from '@/api/admin/audit/flowApi.js'
export default {
  components: {
    Flow: () => import('./flow.vue'),
  },
  data() {
    return {
      listQuery: {
        businessKey: '',
      },
      tableData: [],
    }
  },
  mounted() {
    this.getList()
  },
  methods: {
    getList() {
      let { libraryType, courseId } = this.$store.getters
      this.listQuery.businessKey = libraryType + ':' + courseId
      flowApiQueryCurrentFlowInfo(this.listQuery).then((res) => {
        this.tableData = res.data.data
      })
    },
  },
}
</script>